home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / ixemul / sdk / man / cat4 / unix.0 < prev   
Encoding:
Text File  |  1998-06-15  |  3.2 KB  |  67 lines

  1.  
  2. UNIX(4)                    UNIX Programmer's Manual                    UNIX(4)
  3.  
  4. NNAAMMEE
  5.      uunniixx - UNIX-domain protocol family
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  9.      ##iinncclluuddee <<ssyyss//uunn..hh>>
  10.  
  11. DDEESSCCRRIIPPTTIIOONN
  12.      The UNIX-domain protocol family is a collection of protocols that pro-
  13.      vides local (on-machine) interprocess communication through the normal
  14.      socket(2) mechanisms.  The UNIX-domain family supports the SOCK_STREAM
  15.      and SOCK_DGRAM socket types and uses filesystem pathnames for addressing.
  16.  
  17. AADDDDRREESSSSIINNGG
  18.      UNIX-domain addresses are variable-length filesystem pathnames of at most
  19.      104 characters.  The include file <_s_y_s_/_u_n_._h> defines this address:
  20.  
  21.            struct sockaddr_un {
  22.            u_char  sun_len;
  23.            u_char  sun_family;
  24.            char    sun_path[104];
  25.            };
  26.  
  27.      Binding a name to a UNIX-domain socket with bind(2) causes a socket file
  28.      to be created in the filesystem.  This file is _n_o_t removed when the sock-
  29.      et is closed--unlink(2) must be used to remove the file.
  30.  
  31.      The UNIX-domain protocol family does not support broadcast addressing or
  32.      any form of ``wildcard'' matching on incoming messages.  All addresses
  33.      are absolute- or relative-pathnames of other UNIX-domain sockets.  Normal
  34.      filesystem access-control mechanisms are also applied when referencing
  35.      pathnames; e.g., the destination of a connect(2) or sendto(2) must be
  36.      writable.
  37.  
  38. PPRROOTTOOCCOOLLSS
  39.      The UNIX-domain protocol family is comprised of simple transport proto-
  40.      cols that support the SOCK_STREAM and SOCK_DGRAM abstractions.
  41.      SOCK_STREAM sockets also support the communication of UNIX file descrip-
  42.      tors through the use of the _m_s_g___c_o_n_t_r_o_l field in the _m_s_g argument to
  43.      sendmsg(2) and recvmsg(2).
  44.  
  45.      Any valid descriptor may be sent in a message.  The file descriptor(s) to
  46.      be passed are described using a _s_t_r_u_c_t _c_m_s_g_h_d_r that is defined in the in-
  47.      clude file <_s_y_s_/_s_o_c_k_e_t_._h>. The type of the message is SCM_RIGHTS, and the
  48.      data portion of the messages is an array of integers representing the
  49.      file descriptors to be passed.  The number of descriptors being passed is
  50.      defined by the length field of the message; the length field is the sum
  51.      of the size of the header plus the size of the array of file descriptors.
  52.  
  53.      The received descriptor is a _d_u_p_l_i_c_a_t_e of the sender's descriptor, as if
  54.      it were created with a call to dup(2).  Per-process descriptor flags, set
  55.      with fcntl(2),  are _n_o_t passed to a receiver.  Descriptors that are
  56.      awaiting delivery, or that are purposely not received, are automatically
  57.      closed by the system when the destination socket is closed.
  58.  
  59. SSEEEE AALLSSOO
  60.      socket(2),  intro(4)
  61.  
  62.      "An Introductory 4.3 BSD Interprocess Communication Tutorial", _P_S_1, 7.
  63.  
  64.      "An Advanced 4.3 BSD Interprocess Communication Tutorial", _P_S_1, 8.
  65.  
  66. BSD Experimental                 June 9, 1993                                1
  67.